{extend name="public/base"}

{block name="x-body"}
<style>
    .layui-form-item .layui-input-inline {
        width: 300px;
    }

    .layui-form-item .layui-disabled {
        border: none;
    }
</style>
    <div class="x-body">
        <form class="layui-form">
            <input type="hidden" name="id" value="{$order.id}" />
            <div class="layui-form-item">
              <label class="layui-form-label">
                  商品总价
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="goods_price" name="goods_price"
                         autocomplete="off" class="layui-input layui-disabled" value="{$order.goods_price}" disabled>
              </div>
            </div>

            <div class="layui-form-item">
                <label for="shipping_price" class="layui-form-label">
                    <span class="x-red">*</span>物流运费
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="shipping_price" name="shipping_price" required="" lay-verify="required"
                           autocomplete="off" class="layui-input" value="{$order.shipping_price}" onfocus="isPrice(this)">
                </div>
            </div>

            <div class="layui-form-item">
                <label for="discount" class="layui-form-label">
                    <span class="x-red">*</span>价格微调
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="discount" name="discount" required="" lay-verify="required"
                           autocomplete="off" class="layui-input" value="{$order.discount}" onfocus="isPrice(this)">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    请直接输入要调整的金额, 例如：-80，订单总价会减去80
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    订单总金额
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="total_amount" name="total_amount"
                           autocomplete="off" class="layui-input layui-disabled" value="{$order.total_amount}" disabled>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    应付金额
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="order_amount" name="order_amount"
                           autocomplete="off" class="layui-input layui-disabled" value="{$order.order_amount}" disabled>
                </div>
            </div>
          <div class="layui-form-item">
              <label class="layui-form-label">
              </label>
              <button  class="layui-btn" lay-filter="edit" lay-submit="">
                  修改
              </button>
          </div>
      </form>
    </div>
<script>
    formData('{:url("orders/order_cost")}', 'edit', false, true);
</script>
{/block}